Release 10.1A: OpenEdge Development:
Debugging and Troubleshooting
Starting Query Info logging
To create Query Info log entries, use the Log Entry Types (
-logentrytypes)startup parameter or, for the AppServer and WebSpeed, the srvrLogEntryTypesproperty in theubroker.propertiesfile. Specify theQryInfolog entry type alone or in a comma-separated list that includes other log entry types. For example:
You also can turn on this logging at run time, using the
LOG-MANAGERsystem handle. For example, you can include the following line in the 4GL code:
You can turn off this logging in the 4GL application by resetting the attribute. For example:
Whichever way you start Query Info logging, you must do so before the query starts, or else no logging will occur for this query. If you turn off Query Info logging before the query completes, no logging will occur for this query.
Starting Query Info logging on individual queries
You can turn on Query Info logging programmatically for an individual query by doing the following:
If the query has already started, no Query Info logging occurs.
Upon successful startup, OpenEdge writes a message to the log file noting that it has turned on Query Info logging for the query; the message includes a Query ID, handle, and query name.
To turn off Query Info logging for the query, set the
BASIC-LOGGINGattribute of the query object handle toFALSE. If you do this before the query completes, no query statistics are written. OpenEdge writes a message to the log file noting that it has turned off Query Info logging for the query; the message includes a Query ID, handle, and query name.Writing query statistics on-demand
You can write the currently accumulated Query Info logging statistics on a query to the log before the query completes, by calling the
DUMP-LOGGING-NOW( )method of the query object handle.When you call
DUMP-LOGGING-NOW( )for a pre-pass query, OpenEdge writes the second set of statistics to the log. OpenEdge writes the first set after it builds the result-list. For more information, see the "Query statistics for pre-pass queries" section.The
DUMP-LOGGING-NOW( )method returnsTRUEif OpenEdge successfully writes the statistics to the log file;FALSEotherwise. Logging will fail, for example, if Query Info logging is turned off (for the individual query or in general), or if the query started before Query Info logging was turned on.The syntax for the
DUMP-LOGGING-NOW( )method is:
The
DUMP-LOGGING-NOW()method takes an optional logical argument that, if set toTRUE, resets the query’s statistics to zero after writing to the log.FALSEis the default. In either case, statistics continue to accumulate as the query completes.The following example writes to the log file after each result and resets the accumulated values:
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |